package com.ezmobo.core;

import org.springframework.context.ApplicationContext;

public class ServerContext {
	private static String workPath = "";
	private static ApplicationContext context;

	public static void setWorkPath(String workPath) {
		ServerContext.workPath = workPath;
	}

	public static String getWorkPath() {
		return workPath;
	}

	public static void setContext(ApplicationContext context) {
		ServerContext.context = context;
	}

	public static Object getBean(String beanName) {
		return (Object) context.getBean(beanName);
	}

	public static Object getBean(Class<?> clazz) {
		return (Object) context.getBean(clazz);
	}

}
